﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace bomberbode_server
{
    class powerup:acteur
    {
        private Type _TypePowerup;

        public Type TypePowerup
        {
            get { return _TypePowerup; }
            set { _TypePowerup = value; }
        }

        public powerup(Random heycoucou)
        {
            int prout = heycoucou.Next(1, 100);
            if (prout <= 33 && prout >= 0)
                this._TypePowerup = Type.ExplosionExpander;
            else if (prout > 33 && prout <= 66)
                this.TypePowerup = Type.ExtraBomb;
            else if (prout > 66 && prout <= 80)
                this.TypePowerup = Type.SpeedUp;
            else if (prout > 80 && prout <= 90)
                this.TypePowerup = Type.Skull;
            else if (prout > 90 && prout <= 93)
                this.TypePowerup = Type.Kick;
            else if (prout > 93 && prout <= 96)
                this.TypePowerup = Type.RemoteControl;
            else if (prout > 96 && prout <= 100)
                this.TypePowerup = Type.MaximuExplosion;
        }

        public enum Type
        {
            ExplosionExpander, ExtraBomb, Kick, MaximuExplosion, RemoteControl, Skull, SpeedUp
        }
    }
}
